package com.example.sms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.sms.entity.Course;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional

public interface CourseService extends IService<Course> {

    List<Course> getCourses(Integer teacherId);


    Course addCourse(Course course);

    Integer delCourse(Integer id);

    void delFromTeacherCourse(Integer id);

    Integer addToTeacherCourse(Course course);

    Boolean checkTeacherCourse(@Param("teacherId") Integer teacherId, @Param("courseId") Integer courseId);

    Integer addToTeacherCourse(Integer courseId, Integer teacherId);

    boolean checkTeacherStudent(Integer teacherId, Integer studentId);

    List<Course> getCoursesByTeacherId(Integer teacherId);
}
